Release 10.1A: OpenEdge Data Management:
DataServer for ORACLE
Query tuning with connection and startup parameters
In addition to controlling aspects of how the DataServer handles queries programmatically within 4GL statements, you can control the same aspects through startup and connection parameter options.
Note: Startup and connection parameters override query-tuning defaults. Options set in theQUERY-TUNINGphrase take precedence over startup and connection parameters. For example, if you specify “qt_debug,SQL” at connection it will override theNO-DEBUGdefault. If you additionally specifyNO-DEBUGfor a specific query, theNO-DEBUGfor the query will override the connection setting, and no SQL will be written to the log file for that query. In this example, the DataServer will write a report that includes all the SQL it generates for the application, except for the query with theNO-DEBUGoption. See the "Query tuning" section for more information.You override query-tuning defaults with the DataServer (
-Dsrv) connection parameter when you connect to the ORACLE database. The-Dsrvswitch accepts a comma separated list of options and values. To guarantee correct parsing, there can be no spaces in the list., as shown in the following syntax:
Table 6–5 describes the query-tuning options that you can specify with the
-Dsrvparameter. Unless otherwise indicated, these options apply at compile and run time.
Table 6–5: Connection query-tuning options Option Descriptionqt_bind_whereqt_no_bind_whereqt_cache_size,integer,QT_BYTEqt_cache_size,integer,QT_ROW
- Specifies the size of the cache (in bytes or records) for information used by lookahead or standard cursors.
- Byte maximum: 65535 bytes.
- Byte minimum: Specify the number of bytes contained in a single record. For joins, specify the number of bytes contained in two joined records. If a join returns a 500-byte record, you need a cache of 1000 bytes.
- Row maximum: The number of records that can fit in 65535 bytes. See the "Caching records" section for more information.
- Row minimum: 1. If the server performs the join, the minimum is 2.
- If
QT_BYTEorQT_ROWis omitted,QT_BYTEis assumed.- Default: 1024 bytes with standard cursors; 8192 with lookahead cursors.
qt_lookaheadqt_no_lookahead
The following example shows how to use the query-tuning options to enhance performance. The multiple records that the lookahead cursors require are stored in a 32K cache. In addition, the DataServer writes an extended report on the SQL statements it executes, as shown:
Use startup parameters to override two other query-tuning defaults,
INDEX-HINTandJOIN-BY-SQLDB. Table 6–6 describes these startup parameters.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |